package com.xsz.controller;

import com.xsz.entity.Meeting;
import com.xsz.service.MeetingService;
import com.xsz.util.ResultVOUtil;
import com.xsz.vo.ResultVO;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 会议控制类
 */
@RestController
@RequestMapping("meeting")
public class MeetingController {
    @Resource
    MeetingService meetingService;


    @GetMapping("listAll")
    public ResultVO list(){
        return  ResultVOUtil.success(meetingService.getAll());
    }


    @PostMapping("add")
    public ResultVO add(@RequestBody Meeting meeting){

        return  ResultVOUtil.success(meetingService.add(meeting));
    }

}
